<template>
    <el-table :data="otherVersionList">
        <el-table-column label="评审表编号">
            <template #default="scope">
                <span class="link-type" @click="toDetail(scope.row.id)">{{ scope.row.number }}</span>
            </template>
        </el-table-column>
        <el-table-column label="发行日期" prop="releaseDate"></el-table-column>
        <el-table-column label="版本号" prop="sampleVersion"></el-table-column>
        <el-table-column label="图号" prop="drawingNo"></el-table-column>
        <el-table-column label="规格" prop="carbonBrushSpec"></el-table-column>
        <el-table-column label="送样日期" prop="factSendSampleDate"></el-table-column>
        <el-table-column label="反馈日期" prop="testResultDate"></el-table-column>
    </el-table>
    <div class="sampleDialog"></div>
</template>
<script setup>
import { ref,createVNode,h,getCurrentInstance } from 'vue'
import tsLayer from '@/utils/useDialog'
const instance = getCurrentInstance()
const props = defineProps({
    otherVersionList: { type: Object, default: () => { } },
})
const toDetail = (val) => {
    const box = document.querySelector(".sampleDialog")
    let paramsData = {
        id: val
    }
    import(`@/views/sample/audittable/detailSampleAudit.vue`).then((res) => {
        const form = createVNode(res.default, {
            paramsData,
            onUpdatetable(val) {
                render(null, box)
            }
        })
        tsLayer.open({
            title: '查看样品评审表',
            width: '70%',
            fullScreen: false,
            appContext: instance.appContext,
            box: box,
            content: form
        })
    })
}
</script>
<style scoped lang="less">
.link-type,
.link-type:focus {
    color: #337ab7;
    cursor: pointer;
}

.link-type:focus:hover,
.link-type:hover {
    color: #20a0ff
}
</style>